home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Graphics Plus
/
Graphics Plus.iso
/
msdos
/
raytrace
/
pov
/
gen
/
form04a
/
docs
/
mutation.doc
< prev
next >
Wrap
Text File
|
1994-03-11
|
6KB
|
155 lines
Mutations in FORM
Form is now able to display mutations of a FORM on the screen.
It's still very much a prototype, but I thought someone out there
might like to see even this much. Feel free to send suggestions and
bug reports to rummy@snaffle.demon.co.uk .
To enable mutations use the command line flag -mutate
To change the starting layout use -Layout=x (automatically enables mutate)
Form will then read in the original (parent) form, and display it and
three mutations of it on the screen.
e.g.
╔═══════════════════════════════╗───────────────────────────────────┐
║ ║ │
║ │ │ ║ │ │ │ │
║ └──┬──┘ ║ └──┼──┘ │
║ │ ║ │ │
║ │ ║ │ ┌── │
║ ├─ ║ ├─┘ │
║Parent │ 1 ║ │ 2 │
╚═══════════════════════════════╝───────────────────────────────────┤
│ ┌──┬───┐ │ │
│ │ │ │ │ │ │ │ │
│ └──┬──┘ │ │ │ └──┬──┘ │ │
│ │ └ │ │ │ │ │
│ │ │ │ │ ├── │
│ ├─ │ ├──────┴───┤ │
│ │ 3 │ │ └── 4 │
└───────────────────────────────┴───────────────────────────────────┘
As it displays each mutation you will get the message Parsing, and
then FORM will start drawing the image.
At any stage you can press ESC or TAB,
ESC stops this set of mutations and displays the one line menu,
TAB stops the current mutation and goes onto the next one, or the
menu.
Form may take some time to respond, particularly if you are in the
Parsing stage.
The currently selected mutation is highlighted, you can move the
highlight box using the cursor keys.
The bottom line menu:
This displays the mutation factor, and the mutation currently
selected.
There are also some options that you can pick:
Quit takes you back to DOS
Factor allows you to change the mutation factor,
3 is fairly wild
0.5 is the default
use lower values for fine tuning your results.
Save saves the currently highlighted form to a filename supplied
by you.
Layout you can select how many mutations are displayed at a time.
2 gives you 4
3 gives you 9
4 gives you 16
5 gives you 25
Res it is possible to change the screen res from
1 (not recommended)
to 3 (highly recommended)
sMoothness this is the same as the -q option on the command line
Precision this is the same as the -float flag on the command line
Pressing the cursor keys moves the highlght around the screen so you
can select a new parent to mutate from
Pressing return or "G" (Go) starts a new set of mutations base on the
currently selected mutation.
The Current parent is always saved in a file called PARENT$.FRM As
each form is drawn it is saved to a file called temp1.frm, temp2.frm
etc.
HOW it works(ish).
==================
Every number entered in the FORM is considered suitable for mutation,
and will almost certainly be changed by the mutation system. Each
number (GENE) is taken and processed through the follwing code
NewGene = Gene + Random((Random(0.5)+Gene)*MutationFactor)
This means that each gene is changed proportionally by a random
amount, with some nudging to prevent locking at a value of 0. So a
stack of 20 is more likely to change by at least 1 than a stack of 5.
WARNINGS
========
Don't try and mutate anything with a screen_scale factor in it.
BUGS
====
For some reason FORM seems to crash eratically. I wish I knew why,
I've surrounded the code in as much detection as I can manage and
still it crashes. So save your work frequently, and remember there's
always Parent$.frm and temp#.frm. I haven't seen this bug for a
while, but that doesn't mean it has gone.
Mutations of form which use #include don't save correctly.
Don't use them if you can avoid them.
Sometimes after a long session FORM might run out of memory.
Currently it looses about 4K per set of mutations. I'm tracking this
down at the moment, and this bug is NOT related to the spontaneous crashes.
All values are treated the same!, this means that bends and twists
can take a long time to creep up from low values. So don't go
throwing in any BEND 0's to see what will happen, or you'll be there
all day.
IMPROVEMENTS (due sometime)
===========================
USER INTERFACE
If you have any suggestions at all regarding the user interface
please let me know. I've got practically no idea at all what to do.
PREDICTION
Given a history of previous parents I should be able to "guess" where
you're headed and automatically adjust the mutation factors as you
get close.
RETRY
This could mutate just the currently selected mutation
BACK
This could take you back to the previous mutation in this "cell".
ANIMATION
I'm very interested in this and you're quite likely to see something
of this in the next version.
SAVING COMPLETE LAYOUTS
I'm thinking about this.
ETC.ETC.
Please let me know of ANY (and I mean any) ideas you may have.